Eli Zaretskii [Tue, 24 May 2022 14:12:26 +0000 (17:12 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
समीर सिंह Sameer Singh [Tue, 24 May 2022 11:35:32 +0000 (17:05 +0530)]
Add support for the Buhid and Tagbanwa scripts (bug#55610)
* lisp/language/philippine.el ("Buhid"): New language environment.
("Tagbanwa"): New language environment.
Add input methods for Buhid and Tagbanwa.
Add sample text for Tagbanwa.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Buhid and Tagbanwa.
* lisp/leim/quail/philippine.el ("buhid"): New input method.
("tagbanwa"): New input method.
* etc/HELLO: Add a Tagbanwa greeting.
* etc/NEWS: Announce the new language environments and their
input methods.
Lars Ingebrigtsen [Tue, 24 May 2022 14:11:01 +0000 (16:11 +0200)]
Clean up a test file in /tmp
* test/src/buffer-tests.el (test-restore-buffer-modified-p): Clean
up autosave file in /tmp.
Po Lu [Tue, 24 May 2022 13:20:46 +0000 (21:20 +0800)]
Add more error checking to some X functions
* src/xfns.c (Fx_change_window_property, Fx_delete_window_property)
(Fx_window_property, Fx_window_property_attributes): Check for
errors in case the window is invalid. Also use better function
for interning prop names.
* src/xterm.c (struct x_atom_ref): New structure.
(x_atom_refs): New list. Extract from x_term_init.
(x_intern_cached_atom): New function. Use it in several places
to avoid interning common atoms.
(x_term_init): Adjust accordingly.
* src/xterm.h: Update prototypes.
Po Lu [Tue, 24 May 2022 13:01:14 +0000 (21:01 +0800)]
Prevent errors when Lisp code asks for props of invalid windows
* src/xfns.c (Fx_window_property):
(Fx_window_property_attributes): Catch X errors.
Po Lu [Tue, 24 May 2022 12:58:52 +0000 (20:58 +0800)]
Handle invalid NEWS files during describe-function
* src/help-fns.el (help-fns--first-release): Don't error if
searching for a heading fails.
Jim Porter [Mon, 23 May 2022 00:27:48 +0000 (17:27 -0700)]
Keep subcommands in pipelines from clobbering the head/tail processes
* lisp/eshell/esh-cmd.el (eshell-execute-pipeline): Use 'make-symbol'
for headproc and tailproc.
(eshell-do-pipelines, eshell-do-pipelines-synchronously): Adapt to the
above.
* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-subcommand)
(eshell-test/pipe-subcommand-with-pipe): New test.
* doc/misc/eshell.texi (Bugs and ideas): Remove item about piping to
process from loop; this commit fixes it (bug#55590).
Lars Ingebrigtsen [Tue, 24 May 2022 12:54:40 +0000 (14:54 +0200)]
Tweak remapping fix for set-transient-map
* lisp/subr.el (set-transient-map): The remapping doesn't have to
be in this map.
Štěpán Němec [Tue, 24 May 2022 12:49:42 +0000 (14:49 +0200)]
Add elisp-eldoc-var-docstring-with-value function
* lisp/progmodes/elisp-mode.el
(elisp-eldoc-var-docstring-with-value): New function (bug#55096).
Lars Ingebrigtsen [Tue, 24 May 2022 12:06:38 +0000 (14:06 +0200)]
Make the nativecomp test eln directory more reliably be removed
* lisp/startup.el (startup-redirect-eln-cache, normal-top-level):
Don't create the nativecomp directory here, because this led to
brittle deletions of the directory -- there would be several
instances of the directory left over after a test run.
* lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Create
the nativecomp directory.
Lars Ingebrigtsen [Tue, 24 May 2022 11:22:06 +0000 (13:22 +0200)]
Regenerated ldefs-boot.el
Lars Ingebrigtsen [Tue, 24 May 2022 11:17:53 +0000 (13:17 +0200)]
Further audits of single quotes in Lisp doc strings
* test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
(tags-apropos-additional-actions):
* lisp/window.el (delete-window-choose-selected):
* lisp/vc/ediff-merg.el (ediff-combination-pattern):
* lisp/vc/diff.el (diff-no-select):
* lisp/tab-bar.el (tab-bar-new-tab-choice):
* lisp/simple.el (next-error-message-highlight):
(backward-delete-char-untabify):
* lisp/ses.el (ses-jump-cell-name-function):
* lisp/org/org.el (org-latex-to-html-convert-command):
* lisp/org/org-agenda.el (org-agenda-sorting-strategy):
* lisp/net/tramp.el (tramp-default-file-modes):
* lisp/net/newst-treeview.el
(newsticker-treeview-use-feed-name-from-url-list-in-treeview):
* lisp/net/eww.el (eww-auto-rename-buffer):
* lisp/mwheel.el (mouse-wheel-scroll-amount):
* lisp/mail/rmail.el (rmail-re-abbrevs):
* lisp/info.el (Info-history-forward-menu):
* lisp/gnus/nnselect.el (nnselect-retrieve-headers-override-function):
* lisp/gnus/gnus-start.el (gnus-subscribe-hierarchical-interactive):
* lisp/fringe.el (fboundp):
* lisp/eshell/esh-var.el (eshell-variable-aliases-list):
* lisp/emacs-lisp/checkdoc.el (checkdoc-column-zero-backslash-before-paren):
* lisp/dired-aux.el (dired-confirm-shell-command):
* lisp/calendar/calendar.el (calendar-time-zone-style):
* lisp/ansi-color.el (ansi-color-faces-vector):
(ansi-color-names-vector): Audit use of various single quotes in
Lisp doc strings.
Lars Ingebrigtsen [Tue, 24 May 2022 10:36:41 +0000 (12:36 +0200)]
Audit symbol quoting in Lisp doc strings
* lisp/vc/vc-svn.el (vc-svn-dir-status-files):
* lisp/so-long.el (so-long-mode-maintain-preserved-variables):
* lisp/help-fns.el (help-fns--most-relevant-active-keymap):
* lisp/gnus/nnselect.el (nnselect-get-artlist):
(nnselect-store-artlist):
* lisp/forms.el (forms-enumerate):
* lisp/ffap.el (ffap-string-at-point):
* lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias):
Audit symbol quoting in Lisp doc strings.
Michael Albinus [Tue, 24 May 2022 10:15:41 +0000 (12:15 +0200)]
Add ".epub" to Tramp archive file suffixes.
* doc/misc/tramp.texi (Archive file names):
* lisp/net/tramp-archive.el (tramp-archive-suffixes): Add ".epub".
Lars Ingebrigtsen [Tue, 24 May 2022 09:51:18 +0000 (11:51 +0200)]
Audit quoting symbols in C doc strings
* test/manual/etags/c-src/emacs/src/keyboard.c (Frecursive_edit):
* src/xfns.c (syms_of_xfns):
* src/xdisp.c (Fwindow_text_pixel_size):
(syms_of_xdisp):
* src/w32notify.c (Fw32notify_add_watch):
(Fw32notify_add_watch):
* src/frame.c (Fframe_child_frame_border_width):
* src/comp.c (Fcomp__subr_signature):
* src/alloc.c (Fgarbage_collect):
* lib-src/make-docfile.c (scan_c_stream): Audit quoting symbols in C
doc strings.
Po Lu [Tue, 24 May 2022 07:11:19 +0000 (15:11 +0800)]
Allow the user to fix `x-mouse-click-focus-ignore-position' on some systems
* src/xterm.c (handle_one_xevent): Apply that variable instead.
(syms_of_xterm): Update doc string and add new option to adjust
the focus click timeout.
Po Lu [Tue, 24 May 2022 05:50:07 +0000 (13:50 +0800)]
Fix use of wrong event structure handling XI_Enter events
* src/xterm.c (handle_one_xevent): Use `enter' instead of `xev'
to set the mouse click timeout.
Po Lu [Tue, 24 May 2022 02:55:36 +0000 (10:55 +0800)]
* src/nsmenu.m (ns_menu_show): Use SAFE_ALLOCA.
Po Lu [Tue, 24 May 2022 02:09:59 +0000 (02:09 +0000)]
Minor fixes to cursor color handling on Haiku
* src/haikufns.c (haiku_decode_color): New function.
(haiku_set_foreground_color, haiku_set_background_color)
(haiku_set_cursor_color, haiku_set_mouse_color): Use that
function to decode colors instead. Also set cursor GC
foreground when setting background color.
* src/haikuterm.c (haiku_merge_cursor_foreground): Fix color
equality test.
Po Lu [Tue, 24 May 2022 00:30:51 +0000 (08:30 +0800)]
Only send fallback MONITORS_CHANGED_EVENT when dimensions really changed
* src/xterm.c (handle_one_xevent): Test that root window
configure width and height are not the same as the previously
recorded ones.
Eli Zaretskii [Mon, 23 May 2022 16:26:18 +0000 (19:26 +0300)]
Avoid compiler warnings on macOS (bug#55595)
* configure.ac: Don't use -Wunknown-pragmas with Clang.
* src/comp.c (load_comp_unit): Avoid Clang compilation warning.
Mattias Engdegård [Mon, 23 May 2022 14:34:29 +0000 (16:34 +0200)]
Less wrong printed circular list tail index (bug#55395)
When printing a circular list and `print-circle` is nil, use a
somewhat more meaningful ". #N" tail index. The previous method for
calculating that index was based on Floyd circularity detection being
used so it had been broken ever since the change to Brent's algorithm.
The new index is correct with respect to the start of the list itself
which is what it used to be before being completely broken.
It does not take into account the nesting depth of the list context.
* src/print.c (struct print_stack_entry, print_object):
Keep track of the tortoise index (which is cheap) instead of trying
to derive it from the printed element index.
* test/src/print-tests.el (print-test-rho, print-circular):
New test.
Eli Zaretskii [Mon, 23 May 2022 13:54:17 +0000 (16:54 +0300)]
* src/w32menu.c (w32_menu_show): Use SAFE_ALLOCA. (Bug#55068)
Eli Zaretskii [Mon, 23 May 2022 13:32:47 +0000 (16:32 +0300)]
Fix saveplace.el when desktop.el restores non-ASCII buffers
* lisp/saveplace.el (load-save-place-alist-from-file): Bind
'coding-system-for-read' to nil, so that the 'coding:' cookie in
the save-place file takes effect. (Bug#55592)
Tino Calancha [Mon, 23 May 2022 12:51:08 +0000 (14:51 +0200)]
zap-to-char: Fix interactive specification
* lisp/simple.el (zap-to-char): Include t in the list.
Po Lu [Mon, 23 May 2022 12:50:27 +0000 (12:50 +0000)]
Adapt last change to Haiku as well
* src/haikumenu.c (digest_menu_items, haiku_menu_show): Use
SAFE_ALLOCA for various temporary buffers.
Po Lu [Mon, 23 May 2022 12:31:18 +0000 (20:31 +0800)]
Fix stack overflows with large popup menus
* src/xmenu.c (x_menu_show): Allocate various stacks with
SAFE_ALLOCA.
Po Lu [Mon, 23 May 2022 12:15:43 +0000 (20:15 +0800)]
Fix default child-frame-border-width on PGTK
* src/pgtkfns.c (Fx_create_frame): Make default
`child-frame-border-width' nil. (bug#55588)
Lars Ingebrigtsen [Mon, 23 May 2022 11:56:03 +0000 (13:56 +0200)]
Improve command-error-function discoverability
* lisp/subr.el (error, user-error): Point to command-error-function.
* src/keyboard.c (syms_of_keyboard): Add an example (bug#40750).
समीर सिंह Sameer Singh [Sun, 22 May 2022 18:54:14 +0000 (00:24 +0530)]
Add support for the Hanunoo script (bug#55581)
* lisp/language/philippine.el ("Hanunoo"): New language environment.
Add composition rules for Hanunoo. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Hanunoo.
* lisp/leim/quail/philippine.el ("hanunoo"): New input method.
* etc/HELLO: Add a Hanunoo greeting.
* etc/NEWS: Announce the new language environment and its
input method.
Lars Ingebrigtsen [Mon, 23 May 2022 11:08:17 +0000 (13:08 +0200)]
Make remapped keys work in set-transient-map
* lisp/subr.el (set-transient-map): Make remapped keys work in
transient maps (bug#40096).
Po Lu [Mon, 23 May 2022 10:31:11 +0000 (18:31 +0800)]
Fix coding style of recent change
* src/emacs.c (main): Fix coding style by putting the = operator
on the right row.
Po Lu [Mon, 23 May 2022 10:23:43 +0000 (10:23 +0000)]
Implement monitor change functions on Haiku
* src/haiku_io.c (haiku_len): Handle new event type.
* src/haiku_support.cc (class EmacsScreenChangeMonitor): New
class.
(class Emacs, Emacs): Create new screen change monitor.
(DispatchMessage): Update fullscreen state if the screen
changed.
(SetFullscreen): Don't punt if fullscreen mode is identical.
* src/haiku_support.h (enum haiku_event_type): New event
`SCREEN_CHANGE_EVENT'.
(struct haiku_screen_changed_event): New struct.
* src/haikuterm.c (haiku_read_socket): Handle new event.
Lars Ingebrigtsen [Mon, 23 May 2022 10:17:25 +0000 (12:17 +0200)]
Make `d' in Dired skip dot files
* lisp/dired.el (dired-mark): Skip dot files (bug#38729). This
makes `C-u 10 d' (etc) consistent with marking the next ten lines
with the mouse and then hitting `d'.
Lars Ingebrigtsen [Mon, 23 May 2022 09:58:22 +0000 (11:58 +0200)]
Include development data in --version output
* src/emacs.c (main): Include development into in --version output
(bug#38657).
Juri Linkov [Mon, 23 May 2022 07:48:15 +0000 (10:48 +0300)]
* lisp/tab-bar.el (switch-to-buffer-other-tab): Use pop-to-buffer (bug#55582).
Replace display-buffer with pop-to-buffer that sets the current buffer
explicitly.
Lars Ingebrigtsen [Mon, 23 May 2022 07:45:35 +0000 (09:45 +0200)]
Allow extending 'save-some-buffers'
* lisp/abbrev.el (abbrev--possibly-save): Separated out from
`save-some-buffers'.
(save-some-buffers-functions): Add to the save function.
* lisp/files.el (save-some-buffers-functions): New variable.
(save-some-buffers): Use it.
(save-buffers-kill-emacs): Also use it to see if we have something
to save (bug#55579).
Lars Ingebrigtsen [Mon, 23 May 2022 06:19:04 +0000 (08:19 +0200)]
Make bootstrap remove more generated files
* Makefile.in (bootstrap-clean): Remove lisp/leim/ja-dic/.
Lars Ingebrigtsen [Mon, 23 May 2022 06:09:05 +0000 (08:09 +0200)]
Make bootstrap remove the native-lisp/ directory
* Makefile.in (bootstrap-clean): Remove the native-lisp/ directory.
Po Lu [Mon, 23 May 2022 05:30:33 +0000 (13:30 +0800)]
Minor fixes to PGTK child frames
* src/gtkutil.c (xg_check_special_colors): Handle child frames
correctly.
* src/pgtkfns.c (pgtk_set_child_frame_border_width): Synchronize
code from X. (bug#55588)
* src/pgtkmenu.c (pgtk_menu_show, pgtk_dialog_show): Allow in
child frames. There are no problems here.
* src/pgtkterm.c (pgtk_mouse_position): Clean up coding style.
Po Lu [Mon, 23 May 2022 03:13:45 +0000 (11:13 +0800)]
Implement monitor change functions on GNUstep
* src/nsfns.m (Fns_display_monitor_attributes_list): Fix coding
style.
* src/nsterm.m (nstrace_leave, nstrace_restore_global_trace_state)
(nstrace_fullscreen_type_name): Fix coding style.
(ns_displays_reconfigured, ns_term_init): Make a record of the
previous display attributes list and avoid storing duplicate
events.
([EmacsApp init]): Listen for
NSApplicationDidChangeScreenParametersNotification.
([EmacsApp updateMonitors:]): New method.
(syms_of_nsterm): New staticpro.
Po Lu [Mon, 23 May 2022 02:55:48 +0000 (10:55 +0800)]
Handle screen size changes if the RandR library isn't available
* src/xterm.c (handle_one_xevent): [!HAVE_XRANDR]: Store
MONITORS_CHANGED_EVENT upon root window reconfiguration.
Po Lu [Mon, 23 May 2022 01:57:19 +0000 (01:57 +0000)]
Fix `gui-backend-selection-owner-p' on Haiku
* src/haiku_select.cc (be_update_clipboard_count): New function.
(be_set_clipboard_data): Update clipboard counts.
(BClipboard_owns_clipboard, clipboard_owner_p)
(BClipboard_owns_primary, primary_owner_p)
(BClipboard_owns_secondary, secondary_owner_p): Rename functions
somewhat.
(be_clipboard_owner_p): New function.
* src/haikuselect.c (Fhaiku_selection_put)
(Fhaiku_selection_owner_p): Update selection counts as well.
* src/haikuselect.h: Update prototypes.
Po Lu [Mon, 23 May 2022 01:22:28 +0000 (09:22 +0800)]
Use GDK for handling monitor changes when built with GTK
* src/xterm.c (x_monitors_changed_cb): New function.
(handle_one_xevent): Don't handle RRNotify and
RRScreenChangeNotify on GTK.
(x_term_init): Connect to GdkScreen::monitors-changed instead of
selecting for RRNotify events.
(mark_xterm): Also mark `last_monitor_attributes_list' on GTK.
* src/xterm.h (struct x_display_info): Enable
`last_monitor_attributes_list' on GTK builds as well.
F. Jason Park [Fri, 6 May 2022 04:13:47 +0000 (21:13 -0700)]
Recognize DCC SSEND when receiving files in erc-dcc
* lips/erc/erc-dcc.el (erc-dcc-open-network-stream): Use TLS
for new connections when :secure flag is set.
(erc-dcc-do-GET-command): Set secure flag when user explicitly passes
an "-s" option.
(erc-dcc-do-LIST-command): Show an "s" to indicate a secure connection
when applicable.
(erc-dcc-query-handler-alist): Add extra items for "SSEND", etc.
(erc-dcc-handle-ctcp-send): Set secure flag when a leading "S" appears
in the command type.
F. Jason Park [Sat, 30 Apr 2022 09:16:46 +0000 (02:16 -0700)]
Accommodate nonstandard turbo file senders in erc-dcc
* lisp/erc/erc-dcc.el (erc-dcc-list): Document optional :turbo item.
(erc-message-english-dcc-list-{head,line,item}): Adjust format strings
to make room for "(T)" turbo indicator.
(erc-dcc-do-GET-command): Optionally set :turbo in `erc-dcc-list'
entry when passed "-t" in the "/DCC GET" slash command. Also add
switch to command line in front-matter Commentary, but refrain from
publicizing further because our implementation is only defensive and
only for receiving.
(erc-dcc-do-LIST): Print message with new format specifier for turbo
status.
(erc-dcc-ctcp-query-send-regexp): Account for T- and S-prefixed
commands. Receiving from an SSEND-capable sender will be added in a
subsequent commit.
(erc-dcc-handle-ctcp-send): Set :turbo item in `erc-dcc-list' member
when new match group is nonempty.
(erc-dcc--X-send-final-turbo-ack): New internal variable and potential
future option for extreme corner cases involving maverick turbo
senders, like WeeChat, who don't use the TSEND command variant.
(erc-dcc-get-filter): Don't send when turbo is active.
* test/lisp/erc/erc-dcc-tests.el: Add new file.
(Bug#54458)
F. Jason Park [Sun, 10 Apr 2022 06:32:22 +0000 (23:32 -0700)]
Allow matching against string values in erc-dcc-member
* lisp/erc/erc-dcc.el (erc-dcc-member): Be more tolerant in the
catch-all case by testing for equality instead of identity.
(erc-dcc-do-GET-command): Pass file name when querying
`erc-dcc-member'. (Bug#54458)
F. Jason Park [Mon, 28 Mar 2022 09:24:43 +0000 (02:24 -0700)]
Don't send reports in erc-dcc-get-filter when nested
* lisp/erc/erc-dcc.el (erc-dcc-get-filter): Don't bother sending a
"received so far" receipt if another attempt is still ongoing.
(Bug#54458)
F. Jason Park [Thu, 31 Mar 2022 00:16:11 +0000 (17:16 -0700)]
Summarize failed transfers in erc-dcc
* lisp/erc/erc-dcc.el (erc-dcc-get-sentinel): Display error when total
byte count received is lower than expected.
(erc-message-english-dcc-get-failed): Add `dcc-get-failed' to the
English messages catalog.
(erc-dcc-get-file): Tweak initialization of `erc-dcc-entry-data'.
(Bug#54458)
Stefan Monnier [Sun, 22 May 2022 20:27:21 +0000 (16:27 -0400)]
* lisp/cedet/semantic/fw.el: Fix typo
Stefan Monnier [Sun, 22 May 2022 20:10:58 +0000 (16:10 -0400)]
mode-local: Revert the deprecation of buffer-local overrides
Obviously, I did not understand how the <foo>--install-parser was invoked.
Revert "mode-local: Deprecate buffer-local overrides"
Revert "semantic-install-function-overrides: Declare obsolete"
Revert "wisent.el: Prefer `define-mode-local-override`"
This reverts commits
91bc24c46768aab4a851c87edaea05c7476ff779,
d2e0d1452b976a51579cf044257326850804c562, and
3294ad44ebcd024b4ada68d00bedca33acc52de6.
Lars Ingebrigtsen [Sun, 22 May 2022 18:16:01 +0000 (20:16 +0200)]
Fix bytecomp-test--with-suppressed-warnings test
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Adjust test to change
in warning message.
Lars Ingebrigtsen [Sun, 22 May 2022 18:14:03 +0000 (20:14 +0200)]
Fix previous warning suppression change
* lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn)
(byte-compile-subr-wrong-args):
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
The `wrong-args' warning is really called `callargs'.
Lars Ingebrigtsen [Sun, 22 May 2022 18:07:14 +0000 (20:07 +0200)]
Fix compilation warning in semantic-install-function-overrides
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
Suppress message about wrong number of arguments.
Lars Ingebrigtsen [Sun, 22 May 2022 18:06:24 +0000 (20:06 +0200)]
Allow suppressing messages about the wrong number of arguments
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Add
`wrong-args'.
* lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn)
(byte-compile-subr-wrong-args): Allow suppressing wrong number of
arguments.
Juri Linkov [Sun, 22 May 2022 17:55:35 +0000 (20:55 +0300)]
Enable keys M-down, M-up, M-RET for in-buffer completion
* lisp/minibuffer.el (completion-in-region-mode-map): Add keybindings M-<up>
for minibuffer-previous-completion, M-<down> for minibuffer-next-completion,
M-RET for minibuffer-choose-completion.
(completion-in-region-mode): Set buffer-local
'minibuffer-completion-auto-choose' to nil.
(minibuffer-next-completion): Get the value of
'minibuffer-completion-auto-choose' from the minibuffer.
(minibuffer-previous-completion): Simplify by delegating to
'minibuffer-next-completion'.
* doc/emacs/programs.texi (Symbol Completion): Add description of keys
M-down, M-up, M-RET.
https://lists.gnu.org/archive/html/emacs-devel/2022-05/msg00916.html
Alan Mackenzie [Sun, 22 May 2022 16:55:05 +0000 (16:55 +0000)]
CC Mode: Restore string fence properties at each relevant external entry point
This fixes bug #55230.
* lisp/progmodes/cc-defs.el (c-string-fences-set-flag, c-with-string-fences):
New variable and macro.
* lisp/progmodes/cc-mode.el (c-called-from-text-property-change-p): Add
remove-text-properties to the list of accepted functions.
(c-clear-string-fences, c-restore-string-fences): Surround the functions'
innards with c-save-buffer-state to prevent text property changes causing
change functions to be called.
(c-before-change, c-after-change, c-font-lock-fontify-region): Replace the
explicit calls to c-restore-string-fences and c-clear-string-fences with
invocations of the new macro c-with-string-fences.
* lisp/progmodes/cc-awk.el (c-awk-extend-and-syntax-tablify-region)
(c-awk-end-of-defun)
* lisp/progmodes/cc-cmds.el (c-show-syntactic-information)
(c-electric-backspace, c-hungry-delete-backwards, c-electric-delete-forward)
(c-hungry-delete-forward, c-electric-pound, c-electric-brace)
(c-electric-slash, c-electric-star, c-electric-semi&comma, c-electric-colon)
(c-electric-lt-gt, c-electric-paren, c-beginning-of-defun, c-end-of-defun)
(c-display-defun-name, c-mark-function, c-beginning-of-statement)
(c-end-of-statement, c-indent-command, c-indent-exp, c-indent-defun)
(c-indent-line-or-region, c-fill-paragraph, c-indent-new-comment-line)
(c-context-line-break)
* lisp/progmodes/cc-guess.el (c-guess-region-no-install): These are all
"boundary" functions to CC Mode. Surround each by c-with-string-fences.
kobarity [Sun, 22 May 2022 16:53:00 +0000 (18:53 +0200)]
Don't font-lock invalid invalid class/function names
* lisp/progmodes/python.el (python-font-lock-keywords-level-1):
Don't font-lock invalid invalid class/function names (bug#55573).
Stefan Monnier [Sun, 22 May 2022 16:52:42 +0000 (12:52 -0400)]
mode-local: Deprecate buffer-local overrides
* lisp/cedet/mode-local.el (mode-local-bind): Make all args mandatory.
Deprecate the use of a nil `mode` argument.
Stefan Monnier [Sun, 22 May 2022 16:22:40 +0000 (12:22 -0400)]
semantic-install-function-overrides: Declare obsolete
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
Declare obsolete.
Stefan Monnier [Sun, 22 May 2022 16:21:23 +0000 (12:21 -0400)]
wisent.el: Prefer `define-mode-local-override`
* lisp/cedet/semantic/wisent.el (wisent--parse-stream): Rename from
`wisent-parse-stream` and mark the old name obsolete.
(semantic-parse-stream): Override with `define-mode-local-override`.
* lisp/cedet/semantic/wisent/grammar.el
(semantic-grammar-setupcode-builder): Don't override
`semantic-parse-stream` manually here via
`semantic-install-function-overrides`.
* lisp/cedet/semantic/grm-wy-boot.el: Refresh.
Stefan Monnier [Sun, 22 May 2022 16:13:28 +0000 (12:13 -0400)]
wisent/grammar.el: Prefer `define-mode-local-override`
* lisp/cedet/semantic/wisent/grammar.el
(semantic-grammar-parsetable-builder, semantic-grammar-setupcode-builder):
Override with `define-mode-local-override`.
(wisent-grammar-mode): Don't override them with
`semantic-install-function-overrides`.
Stefan Monnier [Sun, 22 May 2022 16:10:47 +0000 (12:10 -0400)]
cedet/html.el: Prefer `define-mode-local-override`
* lisp/cedet/semantic/html.el (semantic-tag-components): Override via
`define-mode-local-override`.
(semantic-default-html-setup): Don't override via
`semantic-install-function-overrides`.
Stefan Monnier [Sun, 22 May 2022 15:22:29 +0000 (11:22 -0400)]
bovine/grammar.el: Prefer `define-mode-local-override`
* lisp/cedet/semantic/bovine/grammar.el
(semantic-grammar-parsetable-builder, semantic-grammar-setupcode-builder):
Override with `define-mode-local-override`.
(bovine-grammar-mode): Don't override them with
`semantic-install-function-overrides`.
Stefan Monnier [Sun, 22 May 2022 15:13:27 +0000 (11:13 -0400)]
cedet/texi.el: prefer `define-mode-local-override`
* lisp/cedet/semantic/texi.el (semantic-parse-region)
(semantic-parse-changes): Override with `define-mode-local-override`.
(semantic-default-texi-setup): Don't override them with
`semantic-install-function-overrides`.
Stefan Monnier [Sun, 22 May 2022 14:48:58 +0000 (10:48 -0400)]
comp.el: Cosmetic changes
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Tweak code.
(comp-run-async-workers): Don't set `buffer-read-only` directly.
(native--compile-async): Fix misuse of "path".
Stefan Monnier [Sun, 22 May 2022 14:35:02 +0000 (10:35 -0400)]
Run `minibuffer-exit-hook` in the right buffer
* src/minibuf.c (run_exit_minibuf_hook): Take the minibuffer as arg
and run the hook in that buffer.
(read_minibuf): Adjust accordingly.
Michael Albinus [Sun, 22 May 2022 12:48:30 +0000 (14:48 +0200)]
* lisp/window.el (display-buffer-avoid-small-windows): Fix :type.
Po Lu [Sun, 22 May 2022 12:22:44 +0000 (12:22 +0000)]
Clean up Haiku code
* src/haiku_support.cc (movement_locker, class EmacsWindow)
(MouseMoved): Delete `movement_locker' and associated hack,
since it's superseeded by some code in haiku_read_socket.
(key_map, key_chars, dpy_color_space, popup_track_message)
(alert_popup_value, grab_view, grab_view_locker)
(drag_and_drop_in_progress): Write comments and fix
initializers.
* src/haikuterm.c (haiku_read_socket): Update comment.
kobarity [Sun, 22 May 2022 11:26:34 +0000 (13:26 +0200)]
Fix two typos in comments in python.el
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Fix typos in
comments (bug#55557).
Damien Cassou [Sun, 22 May 2022 06:32:38 +0000 (08:32 +0200)]
Fix submit-emacs-patch
submit-emacs-patch creates a new message and immediately inserts new
lines without first moving the point to the message body. This
doesn't work with notmuch (and its notmuch-user-agent symbol) because
the point starts in the headers and nothing in Emacs specifies that
the mua should move point to the body automatically.
* lisp/mail/emacsbug.el (submit-emacs-patch): Make sure point is in
the body before inserting new lines (bug#55571).
Lele Gaifax [Sun, 22 May 2022 08:44:31 +0000 (10:44 +0200)]
Properly indent Python PEP634 match/case blocks
Python 3.10 introduced the "structural pattern matching" syntax, and
commit
139042eb8629e6fd49b2c3002a8fc4d1aabd174d told font-lock about the
new keywords. This adds them also as block-start statements, to enable
proper indentation of such blocks.
* lisp/progmodes/python.el (python-rx): Add "match" and "case" as
block-start keywords.
* test/lisp/progmodes/python-tests.el (python-indent-after-match-block,
python-indent-after-case-block): New tests to verify indentation of
"match" and "case" blocks (bug#55572).
Po Lu [Sun, 22 May 2022 09:15:10 +0000 (17:15 +0800)]
Implement `display-monitors-changed-functions' on MS Windows
* src/w32term.c (w32_read_socket): Handle WM_DISPLAYCHANGE by
sending monitor change events.
Po Lu [Sun, 22 May 2022 07:56:11 +0000 (15:56 +0800)]
Fix uninitialized use of xm drag receiver data
* src/xterm.c (xm_read_drag_receiver_info): Just return if the
protocol is invalid. Reported by Jashank Jeremy
<jashank@rulingia.com.au>.
Po Lu [Sun, 22 May 2022 07:33:50 +0000 (15:33 +0800)]
Fix build with --enable-check-lisp-object-type
* src/xterm.c (handle_one_xevent): Fix use of Fequal. Reported
by Jashank Jeremy <jashank@rulingia.com.au>.
Eli Zaretskii [Sun, 22 May 2022 07:23:35 +0000 (10:23 +0300)]
; Fix documentation of Tagalog
* lisp/leim/quail/philippine.el ("tagalog"):
* lisp/language/philippine.el ("Tagalog"): Fix doc string.
(Bug#55529)
समीर सिंह Sameer Singh [Thu, 19 May 2022 22:07:38 +0000 (03:37 +0530)]
Add support for the Tagalog script
* lisp/language/philippine.el ("Tagalog"): New language environment.
Add composition rules for Tagalog. Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Tagalog.
* lisp/leim/quail/philippine.el ("tagalog"): New input method.
* lisp/loadup.el: Preload lisp/language/philippine.el.
* etc/HELLO: Add a Tagalog greeting.
* etc/NEWS: Announce the new language environment and its
input method.
(Bug#55529)
Po Lu [Sun, 22 May 2022 05:13:01 +0000 (13:13 +0800)]
Fix use-after-free in x_destroy_window
* src/xterm.c (x_destroy_window): Fix use after free of the
dpyinfo.
Po Lu [Sun, 22 May 2022 05:03:12 +0000 (05:03 +0000)]
Fix focus redirection to/from surrogate minibuffer frames on Haiku
* src/haikuterm.c (haiku_get_focus_frame): New function.
(haiku_create_terminal): Register new hook.
Po Lu [Sun, 22 May 2022 03:18:32 +0000 (11:18 +0800)]
Fix GNUstep build
* src/nsfns.m (ns_implicitly_set_icon_type): Don't use UTType if
GNUstep.
Po Lu [Sun, 22 May 2022 03:02:24 +0000 (11:02 +0800)]
Fix compiler warnings on Mac OS X 10.12
* configure.ac: Check for Mac OS X 12 and link with
UniformTypeIdentifiers.framework.
* src/nsfns.m (IOMasterPort): Define to `IOMainPort' on Mac OS X
12.
(ns_implicitly_set_icon_type, Fns_read_file_name):
* src/nsxwidget.m: ([XwWebView
initWithFrame:configuration:xwidget:]): Fix uses of obsolete
things.
Po Lu [Sun, 22 May 2022 01:38:21 +0000 (09:38 +0800)]
Set display size upon RRScreenChangeNotify
* src/xterm.c (handle_one_xevent): Handle RRScreenChangeNotify
correctly.
Po Lu [Sun, 22 May 2022 01:27:46 +0000 (09:27 +0800)]
Don't unnecessarily call monitor change functions
* src/xterm.c (handle_one_xevent): If monitor attributes didn't
change, don't send monitor change event.
(x_term_init, mark_xterm): Mark and init new field.
* src/xterm.h (struct x_display_info): New field
`last_monitor_attributes_list'.
Sean Whitton [Sat, 21 May 2022 23:15:01 +0000 (16:15 -0700)]
; * doc/emacs/dired.texi (Entering Dired): Fix typo.
Eli Zaretskii [Sat, 21 May 2022 13:55:15 +0000 (16:55 +0300)]
; Rename enable-theme and disable-theme hooks
* lisp/custom.el (enable-theme-functions)
(disable-theme-functions): Rename from enable-theme-hook and
disable-theme-hook. All users changed. (Bug#37802)
Michael Albinus [Sat, 21 May 2022 13:44:22 +0000 (15:44 +0200)]
Some cleanups in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-fuse-remove-hidden-files): Declare.
(tramp-test16-directory-files)
(tramp-test16-file-expand-wildcards)
(tramp-test26-file-name-completion, tramp--test-check-files): Use it.
(tramp--test-check-files): Delete directory recursively.
(tramp-test43-file-system-info): Make test more robust.
Michael Albinus [Sat, 21 May 2022 13:43:34 +0000 (15:43 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
kobarity [Sat, 21 May 2022 13:23:21 +0000 (15:23 +0200)]
Fix recently introduced Python font lock breakage of chained assignments
* lisp/progmodes/python.el (python-font-lock-assignment-matcher):
Fix fontification of chained assignments (bug#54992).
Michael Albinus [Sat, 21 May 2022 13:20:10 +0000 (15:20 +0200)]
; Merge from origin/emacs-28
The following commit was skipped:
fa6a0962c5 Fix Tramp sshfs tests (don't merge)
Michael Albinus [Sat, 21 May 2022 13:20:10 +0000 (15:20 +0200)]
Merge from origin/emacs-28
f836ed098f Some minor Tramp fixes
Lars Ingebrigtsen [Sat, 21 May 2022 12:56:13 +0000 (14:56 +0200)]
Add new hooks when enabling and disabling themes
* lisp/custom.el (enable-theme-hook, disable-theme-hook): New
hooks (bug#37802).
(enable-theme, disable-theme): Call them.
Eli Zaretskii [Sat, 21 May 2022 09:55:12 +0000 (12:55 +0300)]
; * etc/NEWS: Fix wording of 'zap-to-char's entry.
Tino Calancha [Sat, 21 May 2022 09:23:17 +0000 (11:23 +0200)]
zap-to-char: case sensitive for upper-case characters
In interactive calls, behave case-sensitively if the given char
is an upper-case character. Same for zap-up-to-char (Bug#54804).
This is analog to what the user-level incremental search feature does.
* lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE.
Perform a case-sensitive search when INTERACTIVE is non-nil and
CHAR is an upper-case character.
* lisp/simple.el (zap-to-char): Same.
* etc/NEWS (Editing Changes in Emacs 29.1): Announce this change.
* test/lisp/misc-tests.el (misc-test-zap-up-to-char): Add test cases.
* test/lisp/simple-tests.el (with-zap-to-char-test): Add helper macro.
(simple-tests-zap-to-char): Add a test.
Po Lu [Sat, 21 May 2022 08:41:34 +0000 (16:41 +0800)]
Improve doc for `display-monitors-changed-functions'
* doc/lispref/frames.texi (Multiple Terminals): Describe how to
retrieve the new monitor configuration inside
`display-monitor-attributes-list'.
Eli Zaretskii [Sat, 21 May 2022 08:04:58 +0000 (11:04 +0300)]
; * etc/HELLO: Improve wording of preamble text. (Bug#55439)
Po Lu [Sat, 21 May 2022 06:46:57 +0000 (14:46 +0800)]
Fix compiler warnings in printer code on 32-bit systems
* print.c (enum print_entry_type, struct print_stack_entry):
Clean up coding style.
(struct print_stack): Make print_stack_entry.list.idx intmax_t,
like it was before the nonrecursive printing was installed.
Also clarify what "Brent cycle detection" means in the comments.
Po Lu [Sat, 21 May 2022 06:28:06 +0000 (06:28 +0000)]
Compute frame workareas on Haiku
* lisp/frame.el (display-monitor-attributes-list): Implement
specially on Haiku as well.
* src/haiku_support.cc (get_zoom_rect): New function. Extract
CalculateZoomRect here.
(class EmacsWindow, SetFullscreen): Use that instead of
CalculateZoomRect.
(be_get_explicit_workarea): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fhaiku_display_monitor_attributes_list): New
function.
(syms_of_haikufns): Register new subr.
Po Lu [Sat, 21 May 2022 03:50:08 +0000 (11:50 +0800)]
Implement monitor change hooks on NS
This hasn't been tested with anything more complicated than
removing an emulated monitor.
* nsterm.m (ns_displays_reconfigured): New function.
(ns_term_init): Register display reconfiguration callbacks.
Po Lu [Sat, 21 May 2022 03:34:51 +0000 (11:34 +0800)]
Call XRRUpdateConfiguration when the root window geometry changes
* src/xterm.c (handle_one_xevent): Call XRRUpdateConfiguration
on RRScreenChangeNotify and upon ConfigureNotify events for the
root window.
Po Lu [Sat, 21 May 2022 03:29:22 +0000 (11:29 +0800)]
Implement `display-monitors-changed-hook' on PGTK
* src/pgtkterm.c (pgtk_draw_glyphless_glyph_string_foreground):
Pacify GCC 12.
(pgtk_monitors_changed_cb): New function.
(pgtk_term_init): Attach new signal handler.